<template>
  <div>
    <template v-if="isTauri">
      <div class="window-control-wrapper" v-if="isTauri()">
        <WindowControl />
      </div>
    </template>
    <div
      class="router-view-wrapper"
      :style="{
        height: isTauri() ? '' : 'calc(100vh - 2px)'
      }"
    >
      <router-view />
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import { isTauri } from "@/utils";

document.addEventListener("contextmenu", e => {
  if (import.meta.env.MODE === "production") {
    e.preventDefault();
  }
});
</script>

<style lang="scss">
@import url("//at.alicdn.com/t/c/font_3719688_fvbmo8icisb.css");
// @import "/iconfont/iconfont.css";

@import "@/components/Document/RegExp/style.scss";

.window-control-wrapper {
  height: 30px;
}

.router-view-wrapper {
  overflow-x: hidden;
  overflow-y: auto;
  height: calc(100vh - 32px);
  border: 1px solid #bfbfbf;
}
</style>
